//
//  UIViewController+Progress.h
//  Driver
//
//  Created by 大橙子 on 2018/11/5.
//  Copyright © 2018 Tomous. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^completionBlock)(void);
@interface UIViewController (Progress)
-(void)showSuccess:(NSString *)success;
-(void)showError:(NSString *)error;
-(void)showMessage:(NSString *)message afterDelay:(NSTimeInterval)timer;
-(void)showMessage:(NSString *)message afterDelay:(NSTimeInterval)timer completion:(completionBlock)completion;
-(void)showWaiting;
-(void)showLoading;
-(void)showLoadingWithMessage:(NSString *)message;
-(void)showSaving;
-(void)hideHUD;



//初始化控制器
+ (instancetype)controller;
//获取根控制器
+ (UIViewController *)rootViewController;
//获取当前导航控制器
+ (UINavigationController*)currentNavigationViewController;
//获取当前控制器
+ (UIViewController *)currentViewController;
@end

NS_ASSUME_NONNULL_END
